﻿@model PersonSearchResultViewModel

@{ var routeValues = new { area = "PersonArea", id = Model.Person.Pk };}

@if (Model.IsVisible)
{
    <div class="searchitem">
        <div>
            <a class="search1" href="@Url.Action("Index", "Details", routeValues)">@Model.Person.FullName</a>

            @if (!Model.Person.IsApproved)
            {
                <span class="k-icon k-i-note" title="Awaiting approval."></span>
            }
        </div>

        @if (Model.Person.CountryGuid != null)
        {
            <div>
                <a class="search2" href="@Url.Action("Index", "Details", new { area = "CountryArea", id = Model.Person.Country.Pk })">@Model.Person.Country.CountryName</a>
            </div>
        }

        @if (Model.Person.Dob != null)
        {
            <div class="search2">@(((DateTime)Model.Person.Dob)._ToDisplayString())</div>
        }

        <div>
            @if (Model.IsDeleteVisible) { @Html.Partial("Links/_DeleteLink", routeValues); }

            @if (Model.IsConfirmApprovalVisible) { @Html.Partial("Links/_ConfirmApprovalLink", routeValues); }
        </div>
    </div>
}


